using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using System.Resources;
using System.Globalization;

namespace LPV_POS.mh_pos.mh_doanhthu
{
    public partial class mh_list_khachhang : DevExpress.XtraEditors.XtraForm
    {
        CultureInfo culture;
        public int str_loaibaocao = 0;

        #region "Muti language"

        private void SetLanguage_banhang(string cultureName)
        {
            try
            {
                culture = CultureInfo.CreateSpecificCulture(cultureName);
                ResourceManager rm = new ResourceManager("LPV_POS.Muti_language.MyResource", typeof(mh_banhang6_PhuThu).Assembly);
                lbel_tongquat.Text = rm.GetString("tongquat", culture);
                lbel_chitietso.Text = rm.GetString("chitietso", culture);
                lbel_chitiet_mathang.Text = rm.GetString("chitietmathang", culture);
                lbel_Diem_khachhang.Text = rm.GetString("diemkhachhang", culture);
                lbel_thoat.Text = rm.GetString("thoat", culture);
                 
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "Note");
            }

        }

        #endregion

        public mh_list_khachhang()
        {
            InitializeComponent();
            culture = CultureInfo.CurrentCulture;
        }

        private void lbel_tongquat_Click(object sender, EventArgs e)
        {
            str_loaibaocao = 1;
            this.DialogResult = DialogResult.OK;
            this.Close();
        }

        private void lbel_chitietban_Click(object sender, EventArgs e)
        {
            str_loaibaocao = 2;
            this.DialogResult = DialogResult.OK;
            this.Close();
        }

        private void lbel_chitietban_mathang_Click(object sender, EventArgs e)
        {
            str_loaibaocao = 3;
            this.DialogResult = DialogResult.OK;
            this.Close();
        }

        private void mh_list_khachhang_Load(object sender, EventArgs e)
        {
            cpublic ocpublic = new cpublic();
            string str_lang = ocpublic.Registry_Get("mh_main_lang");
            if (str_lang == "")
                str_lang = "vi-VN";
            SetLanguage_banhang(str_lang);
        }

        private void lbel_thoat_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }

        private void lbel_Diem_khachhang_Click(object sender, EventArgs e)
        {
            this.Hide();
            mh_baocaodoanhthu_diem_KH frm = new mh_baocaodoanhthu_diem_KH();
            frm.ShowDialog();
            this.Close();
        }
    }
}